-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileCleanup Improvements #633
Conversation
# Main Goal {Describe/list your goal for the PR here} ## PR Status : - Overall Status : Done/In Progress/Stalled/Cancelled - Commits : Done/In Progress/Stalled/Cancelled - Synced to base (Collapse:main) : Yes/Not yet - Build status : OK/Crashing/Build Errors - Crashing : Yes/No - Bug found caused by PR : {int} ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
DO NOT ASK HOW LONG THIS TOOK
…lecleanup-improvement
InjectFileSource 1. Increase possible batch size 2. Use Interlock.Increment Delete to Recycle Bin 1. Improve FileInfoSource removal speed
Co-authored-by: Kemal Setya Adhi <[email protected]>
@@ -220,9 +344,10 @@ private async Task PerformRemoval(ICollection<LocalFileInfo>? deletionSource, lo | |||
await Task.Run(() => RecycleBin.MoveFileToRecycleBin(toBeDeleted)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do it in parallel as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For recycle bin there is no need. It passes the list of files to be deleted to Windows default "Move to recycle bin" method then delete it that way
1. Use backedFileInfoSourceList on InjectFileSource so its faster 2. Remove unnecesary iteration on InjectFileSource 3. Use thread*4 when deleting items
Co-Authored-By: Bagus Nur Listiyono <[email protected]>
+ Initialize deletion file task to fully async with its own thread + Log deletion performance + Pass _assetTotalSize to the injector method instead of the constructor
PR finished, merging manually due to submodule merge conflict |
Main Goal
Improve FileCleanup logics for items > 1000 as before it froze the UI completely
PR Status :